package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 付款条件实体类
 *
 * @author 吴旭
 */
public class TermOfPaymentEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -32678633615316797L;
    private Long TermOfPaymentId;
    private String OrderNo;
    private String TermOfPayment;

    public Long getTermOfPaymentId() {
        return TermOfPaymentId;
    }

    public void setTermOfPaymentId(Long TermOfPaymentId) {
        this.TermOfPaymentId = TermOfPaymentId;
    }

    public String getOrderNo() {
        return OrderNo;
    }

    public void setOrderNo(String OrderNo) {
        this.OrderNo = OrderNo;
    }

    public String getTermOfPayment() {
        return TermOfPayment;
    }

    public void setTermOfPayment(String TermOfPayment) {
        this.TermOfPayment = TermOfPayment;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof TermOfPaymentEntity)) {
            return false;
        }

        final TermOfPaymentEntity that = (TermOfPaymentEntity) o;

        return new EqualsBuilder()
                .append(this.getTermOfPaymentId(), that.getTermOfPaymentId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getTermOfPaymentId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
